﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/NoLeftMasterPage.master"
    AutoEventWireup="true" CodeFile="AccountSplit_UnHappend.aspx.cs" Inherits="AccountSplit_UnHappend" %>

<asp:Content ID="Content1" ContentPlaceHolderID="body" runat="Server">
    <div class="right_container" id="right_container">
        <div class="right_title">
            <asp:Label ID="lbProjectName" runat="server" Text=""></asp:Label>
            <asp:Label ID="lbStageName" runat="server" Text=""></asp:Label>
            预计待发生成本
        </div>
        <div class="right_contract">
            <table class="titleTable">
                <tr>
                    <td align="right">
                        合同名称：
                    </td>
                    <td>
                        <asp:Label ID="lbContract" runat="server" Text=""></asp:Label>
                    </td>
                    <td align="right">
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td align="right">
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        核算金额：
                    </td>
                    <td>
                        <asp:Label ID="lbMoney" runat="server" Text=""></asp:Label>(元)
                    </td>
                    <td align="right">
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td align="right">
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        合同范围：
                    </td>
                    <td>
                        <p>
                            <asp:Label ID="lbScope" runat="server" Text=""></asp:Label></p>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        所属科目：
                    </td>
                    <td>
                        <asp:Label ID="lbAccountName" runat="server" Text=""></asp:Label>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        分摊原则：
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlApproation" runat="server" OnSelectedIndexChanged="ddlApproation_SelectedIndexChanged"
                            needWPesmission="Disable" AutoPostBack="True" DataSourceID="ods_ApportionAreaType" DataTextField="Name" DataValueField="Id">
<%--                            <asp:ListItem Selected="True" Value="0">--请选择--</asp:ListItem>
                            <asp:ListItem Value="1">占地面积</asp:ListItem>
                            <asp:ListItem Value="2">建筑面积</asp:ListItem>
                            <asp:ListItem Value="3">地上销售面积</asp:ListItem>--%>
                        </asp:DropDownList>
                        <asp:CheckBox ID="cbIsCustomChecked" runat="server" Checked="false" Text="自定义" AutoPostBack="True"
                            needWPesmission="Disable" OnCheckedChanged="cbIsCustomChecked_CheckedChanged"
                            CssClass="cb_custom" />
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td align="right" valign="top">
                        描述：
                    </td>
                    <td>
                        <asp:TextBox ID="tbCause" runat="server" TextMode="MultiLine"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
            <div class="op_menu">
                <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" needWPesmission="True" />
                <input id="btnClose" value="关闭" type="button" onclick='window.close();return false;' />
            </div>
            <div>
                <asp:GridView ID="gvSplitDetailList" runat="server" AutoGenerateColumns="False" DataSourceID="ods_detailSplitList"
                    OnDataBound="gvSplitDetailList_DataBound" CssClass="List">
                    <Columns>
                        <asp:TemplateField ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:CheckBox ID="CBIsSelect" runat="server" Checked='<%# Eval("checked").ToString()=="1" %>'
                                    AutoPostBack="True" OnCheckedChanged="CBIsSelect_CheckedChanged" needWPesmission="Disable" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="业态" DataField="Dev_FormatName" ItemStyle-Width="300px" />
                        <asp:TemplateField HeaderText="面积(m2)" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Label ID="lbArea" runat="server" Text='<%# Eval(Common_Bussiness.GetApproationTypeColName(ddlApproation.SelectedItem.Value))%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="成本(元)" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:TextBox ID="lbCost" runat="server" Text='<%# Eval("Value").ToDisplayString() %>'></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField Visible="false" HeaderText="">
                            <ItemTemplate>
                                <asp:Label ID="lbId" runat="server" Text='<%# Eval("Dev_FormatID").ToString()%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <asp:ObjectDataSource ID="ods_detailSplitList" runat="server" SelectMethod="GetDetailSplitList_UnHappend"
                    TypeName="PKURG.CostSplit.Business.DetailSplit" OldValuesParameterFormatString="original_{0}">
                    <SelectParameters>
                        <asp:QueryStringParameter DbType="String" Name="contractId" QueryStringField="Id" />
                    </SelectParameters>
                </asp:ObjectDataSource>
            </div>
        </div>
    </div>
            <asp:ObjectDataSource ID="ods_ApportionAreaType" runat="server" 
            SelectMethod="GetApportionAreaType" 
            TypeName="PKURG.CostSplit.Business.BusinessTypeArea"></asp:ObjectDataSource>
    <asp:HiddenField ID="hf_src" runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="script" runat="Server">
    <link href="/Resource/css/cs_detail.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function load() {
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        }

        function EndRequestHandler() {
            if (navigator.userAgent.indexOf("Firefox") > 0) {
                $("#btnClose").hide();
            }
        }
        $(document).ready(function () {
            if (navigator.userAgent.indexOf("Firefox") > 0) {
                $("#btnClose").hide();
            }
        })

    </script>
</asp:Content>
